__author__ = 'wenke1'

class Student(object):
    pass
class NewStudent(object):
    def __init__(self,name,score,gender):
        self.name=name
        self.score=score
        testgender="test:"+gender
        print testgender
    def print_name(self):
        print self.name
    # def print_gender(self):
    #     print testgender
Student()
print type(Student())
print Student().__class__
print(Student().__module__)
print dir(Student)

xinyou=Student()
huanqi=Student()
zihua=Student()
print "xinyou id is",id(xinyou)
print "zihua id is:",id(zihua)

xinyou.name="Xinyou"
print xinyou.name

new_xinyou=NewStudent("Xinyou",90,"female")
print new_xinyou.name,new_xinyou.score
new_xinyou.print_name()

class UniversityStudent(NewStudent):
    def print_name(self):
        print "university student name is;",self.name

xiaohong=UniversityStudent('xiaohong',90,'male')
xiaohong.print_name()

print isinstance(xiaohong,NewStudent)
print isinstance(xiaohong,Student)
print isinstance(new_xinyou,UniversityStudent)